package com.bw.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
public class TestController {



    @RequestMapping("/test.do")
    public String test(Model model, HttpServletRequest request, HttpServletResponse response){

        Cookie cookie = new Cookie("name", "tom");

        response.addCookie(cookie);

        return "test";
    }
}
